'\" te
.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH GETCPUID 3C "Apr 16, 2003"
.SH NAME
getcpuid, gethomelgroup \- obtain information on scheduling decisions
.SH SYNOPSIS
.LP
.nf
#include <sys/processor.h>

\fBprocessorid_t\fR \fBgetcpuid\fR(\fBvoid\fR);
.fi

.LP
.nf
\fBushort_t\fR \fBgethomelgroup\fR(\fBvoid\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBgetcpuid()\fR function returns the processor ID on which the calling
thread is currently executing.
.sp
.LP
The \fBgethomelgroup()\fR function returns the home locality group ID of the
calling thread.
.SH RETURN VALUES
.sp
.LP
See \fBDESCRIPTION\fR.
.SH ERRORS
.sp
.LP
No errors are defined.
.SH USAGE
.sp
.LP
Both the current CPU and the home locality group can change at any time.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	T{
\fBgetcpuid()\fR is Stable; \fBgethomelgroup()\fR is Obsolete.
T}
_
MT-Level	MT-Safe
.TE

.SH SEE ALSO
.sp
.LP
.BR meminfo (2),
.BR p_online (2),
.BR processor_bind (2),
.BR processor_info (2),
.BR pset_assign (2),
.BR pset_bind (2),
.BR pset_info (2),
.BR sysconf (3C),
.BR lgrp_home (3LGRP),
.BR attributes (7),
.BR psradm (8),
.BR psrinfo (8),
.BR psrset (8)
.SH NOTES
.sp
.LP
The \fBgethomelgroup()\fR function is obsolete and might be removed in a future
release. It has been replaced by \fBlgrp_home\fR(3LGRP).
